tweaks for format vectors. (#434)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Mon, 9 Dec 2019 18:39:58 +0000 (11:39 -0700)
committerGitHub <noreply@github.com>
Mon, 9 Dec 2019 18:39:58 +0000 (11:39 -0700)
flush out hiketech capability array.

use copy constructor of ff_vecs_t when creating unified vector list.

hiketech.cc
vecs.cc

index b3bff748bba5c2a3d40696aee3c8cdc08c2ca013..938063846233c56709e9c906bd9188dc18642813 100644 (file)
@@ -302,7 +302,7 @@ void        ht_trk_alt(xg_string args, const QXmlStreamAttributes*)
 
 ff_vecs_t hiketech_vecs = {
   ff_type_file,
-  { (ff_cap)(ff_cap_read | ff_cap_write), (ff_cap)(ff_cap_read | ff_cap_write) },
+  { (ff_cap)(ff_cap_read | ff_cap_write), (ff_cap)(ff_cap_read | ff_cap_write), ff_cap_none },
   hiketech_rd_init,
   hiketech_wr_init,
   hiketech_rd_deinit,
diff --git a/vecs.cc b/vecs.cc
index f4730ff988354ecc9afdbc8605b65a26a964c7f0..8461accaebf9b69307f1e3677ac5a4e9d934f9d2 100644 (file)
--- a/vecs.cc
+++ b/vecs.cc
@@ -1454,9 +1454,8 @@ sort_and_unify_vecs()
     xcsv_read_internal_style(svec.style_buf);
     vecs_t uvec;
     uvec.name = svec.name;
-    uvec.vec = new ff_vecs_t; /* LEAK */
     uvec.extensions = xcsv_file.extension;
-    *uvec.vec = *vec_list.at(0).vec; /* Inherits xcsv opts */
+    uvec.vec = new ff_vecs_t(*vec_list.at(0).vec); /* Inherits xcsv opts */ /* LEAK */
     /* Reset file type to inherit ff_type from xcsv. */
     uvec.vec->type = xcsv_file.type;
     /* Skip over the first help entry for all but the